package com.longteng.lesson2.domain;

/**
 * Created by taki
 * DATE : 2018/11/4 0004
 * TIME : 22:58
 * PROJECT : java-lesson
 * PACKAGE : com.longteng.lesson
 *
 * @author <a href="mailto:165157905@qq.com">taki</a>
 */
public class Child extends Person {

    Child(String name){
        super(name);
        //super ==new Person
        //Person person =new Person(name);
        // super(name) =new Person(name);
    }
//    @Override
//    public void setName(String name) {
//        System.out.println("我终于有名字啦");
//    }
   public void play(){
        super.setName("person");
        this.setName("child");

       System.out.println("我是孩子，我喜欢玩");
   }

}
